/**
 *  文件名:ActivityFeedback.java
 *  修改人:lihangjie
 *  创建时间:2015-8-28 下午12:09:05
 */
package com.sharemob.tinchat.modules.discover;

import java.util.ArrayList;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.sharemob.tinchat.R;
import com.sharemob.tinchat.base.BaseActivity;
import com.sharemob.tinchat.base.FriendItem;
import com.sharemob.tinchat.base.ListAdapterForFriend;
import com.sharemob.tinchat.base.ListAdapterForNearby;

/**
 * 
 * <一句话功能简述>
 * 
 * @author lihangjie version [版本号,2015-8-28 下午12:09:05]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 * 
 */
public class NearbyActivity extends BaseActivity {
	
	private String [] places=new String[]{"深圳市南山区特发信息港","深圳市南山区科兴科学园","深圳市南山区源兴大夏"};
	private int[] resids=new int[]{R.drawable.introduce_bg3,R.drawable.bg_space,R.drawable.header_10001};
	private String[] nicknames=new String[]{"诱惑的天使","大嘴巴","无敌丑女"};
	private int[] sex=new int[]{1,0,1};
	
    private ListView infoListView=null;
    private ListAdapterForNearby listAdapter=null;
    private ArrayList<FriendItem> list = new  ArrayList< FriendItem>();

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		this.setContentView(R.layout.activity_discover);
        listAdapter=new ListAdapterForNearby();
        infoListView=(ListView)findViewById(R.id.listView_friends); 
        
        initData();
        
        this.exitView(R.id.title_back,R.anim.activity_close,0);
        
        this.setTitle("附近的人");
	}
	
	private void initData(){
		
		for(int i=0;i<3;i++){
	        FriendItem friend=new FriendItem();
	        friend.setHeader_resid(resids[i]);
	        friend.setId("1001");
	        friend.setAge(27);
	        friend.setNickname(nicknames[i]);
	        friend.setPlace(places[i]);
	        friend.setSex(sex[i]);
	        friend.setCity("深圳");
	        list.add(friend);
	        
		}

        listAdapter.setAdapter(list);
        infoListView.setAdapter(listAdapter);
	}

	@Override
	protected void keyEventOfListView(int position, int id) {
		
	}

}
